Skip to content
  • 0 Votes
    2 Posts
    124 Views
    C

    Regarding your notes: it may be independent of all those things but it may be dependent on the compiler toolchain used, the Qt version in use, and the Windows version for both recording and playback.

    The Windows component that generated the audio stream provided something odd that Windows Media Player cannot understand. ffmpeg produces valid AAC Low Complexity the Windows Media Player does understand. It's unclear what the original stream is. If the original stream was AAC Main Profile then ffprobe would have reported "Audio: aac (Main) (mp4a / 0x6134706D)...". High Efficiency AAC would be reported as "Audio: aac (HE-AAC) (mp4a / 0x6134706D)" (and less likely to be playable).

    Does the audio play correctly if extracted from the container?

    ffmpeg.exe -i original_video.mp4 -c: copy -vn original_video_audio.m4a
  • 0 Votes
    5 Posts
    704 Views
    R

    Thank you for your help, I've probably identified the problem - one of the input parameters was a char (8 bit). I've tried to fix it using the following code to reformat it so that it can be used properly for 16 bit but I keep getting the same problem

    /* Function with char as one of the parameters - qint64 XYSeriesIODevice::writeData(const char *data, qint64 maxSize) - same as in the Qt audio example**/ int bitsPerSample = 16; int bytesPerSample = (bitsPerSample / BITS_IN_BYTE); int signalLength = (strlen(data) ) / numChannels / bytesPerSample; short* signal = (short*)malloc(sizeof(short) * signalLength); for(int i = 0; i < signalLength; i++){ int index = i * numChannels * bytesPerSample; memcpy(&signal[i], &data[index], sizeof(short)); }

    Any suggestions?

  • 0 Votes
    2 Posts
    938 Views
    SGaistS

    Hi,

    Take a look the QAudioInput example.